<?php
function ntp_text($txtId)
{
	global $langmeta;

	$langId = $_SESSION['LC_ALL'];
	$langobj = $langmeta[$langId]['TRANSLATE'];
	
	if(isset($langobj[$txtId]))
		return $langobj[$txtId];//"NTP_TEXT";
	else
		return $txtId;
}

function do_translation ($params, $content, &$smarty, &$repeat) 
{ 
  if (isset($content)) 
  { 
    //$lang = $params['lang']; 
    // do some translation with $content 
    return ntp_text($content); 
  } 
} 

$smarty->register_block("ntp_tr", "do_translation"); 
//$smarty->assign("LANGMETA", $langmeta);
?>